/*
 * @author hs_yataozhang date : Aug 9, 2011 4:37:32 PM
 */
package com.homwee.factory.util;

import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import android.content.Context;
import android.graphics.Bitmap;
 
/**
 * 常量
 * @author hs_yataozhang
 */
public class Core {

	
	public final static String TAG="CHLauncher";
	
	public final static int INIT_INDEX_OF_HOMEGALLERY=9000;
	public final static int TOTAL_ITEM_OF_HOMEGALLERY=9;
	
	public final static int HOME_WEATHER=8;
	public final static int HOME_TV_AV=0;
	public final static int HOME_BROWSER=2;
	public final static int HOME_MMP=1;
	public final static int HOME_ONLINE_MMP=7;
	public final static int HOME_APP_STORE=3;
	public final static int HOME_SETTING=4;
	public final static int HOME_USER_ADD=5;
	public final static int HOME_GAME=6;
	
	public final static int HOME9View_APP_STORE=7;
	public final static int HOME9View_BROWSER=6;
	public final static int HOME9View_MMP=5;
	public final static int HOME9View_ONLINE_MMP=2;
	public final static int HOME9View_TV_AV=4;
	public final static int HOME9View_WEATHER=3;
	public final static int HOME9View_GAME=1;
	public final static int HOME9View_SETTING=8;
	public final static int HOME9View_APP=0;
	
	public static String DATA_PATH="";
	public static String CAPTURE_SCREEN_JPEG_PATH="/tmp/tvscreen.jpeg";
		
	public final static String HOME_ONLINE_MMP_FILE="onlinemmp.file";
	public final static String HOME_APP_FILE="app.file";
	public final static String HOME_GAME_FILE="game.file";
	
	
	public final static int HOME_USERADD_MENU_ADD=0;
	//public final static int HOME_USERADD_MENU_SORT=1;
	//public final static int HOME_USERADD_MENU_REFRESH=2;
	public final static int HOME_USERADD_MENU_APP_MANAGER=1;
	
	
	public static boolean mLoadingTexture=false;
	//added by lizuhong for 
	public static boolean mFinishThumbnailModeInitial=false;
	
	public final static int APP_ICON_SIZE=0;
	public final static int HOME_9_VIEW_ICON=1;
	public final static int TEMP_WEB_VIEW_SIZE=2;
	public final static int AINM2_APP_ICON_SIZE=3;
	
	public final static int HOME_ITEM_PADDING_LEFT=400;
	public final static int HOME_ITEM_PADDING_RIGHT=210;
	public final static int HOME_ITEM_PADDING_TOP=200;
	public final static int HOME_ITEM_PADDING_BOTTOM=0;
	
	
	public final static int HOME_ITEM_WIDTH=1366;
	public final static int HOME_ITEM_HEIGHT=768;
	
	public final static int SCREEN_WIDTH=1280;
	public final static int SCREEN_HEIGHT=720;
	
	
	public final static String ANIM_FINISHED_ACTION_NAME="COM.MEDIATEK.ANIMATION.FINISHED";
	public final static String ANIM_START_ACTION_NAME="COM.MEDIATEK.ANIMATION.START";
	
	public final static float MY_RENDER_MOVE_BOUND_RIGHT=5.09f;
	public final static float MY_RENDER_MOVE_BOUND_LEFT=-4.99f;
	
	public final static int FOR_SWITCHCASE_DEFAULT=1234567;
	
	public static boolean APP_SOTRE_HAVE_BEEN_CHANGED=false;
	public static boolean SETTING_HAVE_BEEN_CHANGED=true;
	
	public static boolean ANIM_MOVING_STATUS=false;
	
	public final static String KEY_SHOW_MESSAGE_DIALOG="message";
	
	public static List<String> ONLINE_MMP_LIST=new ArrayList<String>();
	public static List<String> USERADD_LIST=new ArrayList<String>();
	public static List<String> GAME_LIST=new ArrayList<String>();

	public static boolean START_MMP=false;
	
	public final static Long CHECK_IF_TIME_UPDATED=946746899007l;	//

	public static final String tv_thumb_path = "/data/app/test.jpeg";

	public static final int START_FROM_USER_FAVOURITE = 1000;
	public static final int WRITE_OBJECT_USER_FAVOURITE = 1001;
	
	public static final int SYSTEM_KEY_RETURN_TO_HOME3D = 1002;
	public static final int SYSTEM_KEY_RETURN_TO_HOME_APPLIST = 1003;
	public static final int SYSTEM_KEY_RETURN_TO_HOME_3D_FAVLIST = 1004;
	
	public static final int LEAVE_TV = 1005;
	public static final int USER_ACTIVE_OOBE = 1006;
	public static final int USER_ACTIVE_OOBE_ACTIVITY = 1007;
	
	public static final int SYSTEM_KEY_RETURN_TO_HOME_NO_APP_KEY = 1008;
	
	public static boolean Leave_TV_lock = true;
	public static boolean Enter_TV_lock = false;
	
	public static final String USER_FAVOURITE_KEY="USER_ADD";
	public static final int APPLIST_MODE_VIEW_MODE=0;
	public static final int APPLIST_MODE_SELECT_MODE=1;
	public static int APPLIST_MODE=0;
	public static String[] filePath = new String[] {"/tmp/third_city_image.png",
		"/tmp/first_city_image.png","/tmp/second_city_image.png",};
	
	public static String[] filePathOrder = new String[] {
		"/tmp/first_city_image.png","/tmp/second_city_image.png","/tmp/third_city_image.png"};
	
	public static HashMap<Integer,Boolean> uPdateList=new HashMap<Integer,Boolean>(); 
	static{
		uPdateList.put(Core.HOME_USER_ADD, false);
		uPdateList.put(Core.HOME_ONLINE_MMP, false);
		uPdateList.put(Core.HOME_GAME, false);
	}
	
	public static ConcurrentHashMap<String, SoftReference<Bitmap>> mSoftBitmapCache =
		new ConcurrentHashMap<String,SoftReference<Bitmap>>();
	
	public static HashMap<String,String> mIconUri=new HashMap<String,String>();

	public static boolean reSetApplication=false;
	
	public static void setPath(Context context){
		DATA_PATH=context.getFilesDir().getAbsolutePath();
		CAPTURE_SCREEN_JPEG_PATH="/tmp/tvscreen.jpeg";
	}
	
	public static boolean From_ScreenSaver=false;
	public static final String Screen_Saver_LeaveTV="com.changhong.LeaveTV";
	
	public static final int APPLIST_MAX_SIZE=44;
	
}
